package cn.bobohost.order.web.controller;

import cn.bobohost.order.feginclient.UserFeginClient;
import cn.bobohost.order.pojo.ResultDTO;
import cn.bobohost.order.pojo.ResultPageDTO;
import cn.bobohost.order.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RestController
@RequestMapping("/order")
@CrossOrigin
public class OrderController {

    //注入servcie
//    @Autowired
//    private OrderService orderService;

    @Autowired
    private UserFeginClient userFeginClient;

    //分页查询
    @PostMapping("/{pageNum}/{pageSize}")
    public ResultDTO listPage(@RequestBody Map<String,Object> paramMap, @PathVariable int pageNum, @PathVariable int pageSize){
        return userFeginClient.listPage(paramMap, pageNum, pageSize);
    }
}
